package com.jeesite.modules.isys.common.entity;


import lombok.Data;

import java.util.List;

@Data
public class MyPage {

    private Object list;
    private Integer pageNo;
    private Integer count;
    private Integer pageSize;
    //总条数
    private Integer total;


    //总页数
    private Integer allPage;


    public Integer getAllPage(){
        //计算总页数

        if (pageSize == 0||total == 0){
            return  0;
        }

       Integer  temp  = total/pageSize;

        if (total % pageSize == 0){
            return  temp;
        }else {
            return  temp + 1 ;
        }
    }

}
